#include <stdio.h>
int main(){
    int I=0;
    int bonus=0;
    printf("Please enter profit\n");
    scanf("%d",&I);
    if(I<=100000){
        bonus=I*0.1;
        printf("%d\n",bonus);
    }else if(I>100000 && I<=200000){
        bonus=(I-100000)*0.075+100000*0.1;
        printf("%d\n",bonus);
    }else if(I>200000 && I<=400000){
        bonus=(I-200000)*0.05+100000*0.1+100000*0.075;
        printf("%d\n",bonus);
    }else if(I>400000 && I<=600000){
        bonus=(I-400000)*0.03+100000*0.1+100000*0.075+200000*0.05;
        printf("%d\n",bonus);
    }else if(I>600000 && I<=1000000){
        bonus=(I-600000)*0.015+100000*0.1+100000*0.075+200000*0.05+200000*0.03;
        printf("%d\n",bonus);
        
    }else if(I>1000000){
        bonus=(I-1000000)*0.01+100000*0.1+100000*0.075+200000*0.05+200000*0.03+400000*0.015;
        printf("%d\n",bonus);
    }
    return 0;
}